/*
 * CodeList.h
 *
 *  Created on: 4 May 2010
 *      Author: Savramis Sartios
 */

#ifndef CODELIST_H_
#define CODELIST_H_
#include <vector>
using namespace std;
#include "ICodeList.h"
/**
 *	This class contains codes of student's courses
 */
class CodeList : public ICodeList {
public:
	CodeList();
	virtual ~CodeList();

	/**
	 * Return's the code list
	 */
	virtual ICodeIterator *	getIterator();

	/**
	 * Add a single code to the code list
	 * \param code	course code
	 * \throw NullPointer
	 */
	virtual bool	add(const string * code);

	/**
	 * Return how many codes are stored
	 * \return	number of codes
	 */
	virtual int		count()const;
	/**
	 * Returns the code at position
	 * \return	course		code
	 * \param	position	position in vector
	 * \throw	OutOfBound
	 */
	virtual string	 getElement(const int position)const;
private:
	vector<string> codeList_;
};

#endif /* CODELIST_H_ */
